package com.joysuch.wwyt.monitoringcenter.enums;

/**
 * 重大危险源等级枚举
 * @author xsx
 * @version 1.0
 * @date 2023/1/4 9:08
 */
public enum MhLevelEnum {

    one_level(1,"一级"),
    two_level(2,"二级");
    private Integer level;
    private String name;

    MhLevelEnum(Integer level, String name) {
        this.level = level;
        this.name = name;
    }


    public static Integer getLevel(String name) {
        MhLevelEnum[] values = MhLevelEnum.values();
        for (MhLevelEnum value : values) {
            if (value.getName().equals(name)) {
                return value.getLevel();
            }
        }
        return null;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



}
